﻿using LoveEatRabbit.Domain.RBAC;
using Microsoft.EntityFrameworkCore;

namespace LoveEatRabbit.Infrastructure
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class MyDbcontext : DbContext
    {
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="options">选项</param>
        public MyDbcontext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 用户实体类
        /// </summary>
        public DbSet<UserModel> Users { get; set; }
        /// <summary>
        /// 角色实体类
        /// </summary>
        public DbSet<RoleModel> Roles { get; set; }
        /// <summary>
        /// 权限实体类
        /// </summary>
        public DbSet<PermissionModel> Permissions { get; set; }
        /// <summary>
        /// 角色权限实体类
        /// </summary>
        public DbSet<RolePermissionModel> RolePermissions { get; set; }
    }
}
